package com.pojo;

import com.auto.annotation.AutoCode;
import com.auto.annotation.Column;
import com.auto.annotation.Table;

import java.io.Serializable;

/**
 * 中间数据字典
 */
@AutoCode(isOverride = false, showWay = "list")
@Table(name = "PD_MIDDATADIC")
public class MidDataDic implements Serializable{

	private static final long serialVersionUID = -6079673538638327664L;

	@Column(flag = "primary",jsname = "单位编号",jswidth = 150)
	private String companyid;
	@Column(flag = "primary",treeId=true,autoGenneral=true,treecolumn=true,jsname="编号",jswidth=150,jsAllowBlank=false,jsValidator=true,keyWordFilte=true)
	private String id;
	@Column(type="varchar(200)",jsname="名称",jsAllowBlank=false,jswidth=150,keyWordFilte=true)
	private String name;//名称
	@Column(type = "int",jsname="类型",render="function(v){if(v=='1'){return '数据录入';}else {return '自动计算';}}",
			jsxtype="radiogroup [items:[{"
					+"inputValue: '1',"
					+"boxLabel: '数据录入',"
					+"anchor  : '60%',"
					+"name  : 'type',"
					+"checked: true"
					+"}, {"
					+"inputValue: '2',"
					+"anchor  : '60%',"
					+"name  : 'type',"
					+"boxLabel: '自动计算'"
					+"}]]")
	private int type;//1数据录入 2自动计算
	@Column(jsname = "状态", render = "function(v){if(v=='0'){return '<span style=\"color:green\"><b>启用中</b></span>';}else {return '<span style=\"color:red\"><b>已停用</b></span>';}}",
			jsxtype = "radiogroup [items:[{"
					+ "inputValue: '0',"
					+ "boxLabel: '启用',"
					+ "anchor  : '30%',"
					+ "name  : 'isstop',"
					+ "checked: true"
					+ "}, {"
					+ "inputValue: '1',"
					+ "anchor  : '30%',"
					+ "name  : 'isstop',"
					+ "boxLabel: '停用'"
					+ "}]]")
	private int isstop;//0 否  1 是
	@Column(jsname="父类",jsAllowBlank=false,jswidth=150)
	private String parentid;//大类
	@Column(type="int",jsname="使用范围",render="function(v){if(v=='1'){return '部门';}else if(v=='0'){return '全部';}else {return '个人';}}",
			jsxtype="radiogroup [items:[{"
					+"inputValue: '0',"
					+"boxLabel: '全部',"
					+"anchor  : '30%',"
					+"name  : 'deptorper'"
					+"},{"
					+"inputValue: '1',"
					+"boxLabel: '部门',"
					+"anchor  : '30%',"
					+"name  : 'deptorper',"
					+"checked: true"+
					"}, {"
					+"inputValue: '2',"
					+"anchor  : '30%',"
					+"name  : 'deptorper',"
					+"boxLabel: '个人'"
					+"}]]")
	private int deptorper;//1部门  2个人
	@Column(type="int",jsname="小数位",jsAllowBlank=false,jswidth=150)
	private int dec;//小数位


	//==============================GETTER && SETTER===================//

	public String getCompanyid() {
		return companyid;
	}

	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getIsstop() {
		return isstop;
	}

	public void setIsstop(int isstop) {
		this.isstop = isstop;
	}

	public String getParentid() {
		return parentid;
	}

	public void setParentid(String parentid) {
		this.parentid = parentid;
	}

	public int getDeptorper() {
		return deptorper;
	}

	public void setDeptorper(int deptorper) {
		this.deptorper = deptorper;
	}

	public int getDec() {
		return dec;
	}

	public void setDec(int dec) {
		this.dec = dec;
	}
}
